/*! 
 * Header file for a collision primitive descriptor structure.
 *
 * \author Devis Rossini
 * \date 15 April 2012
 */ 
#ifndef PHXCOLLISIONPRIMITIVEDESCRIPTOR_H_INCLUDE_GUARD
#define PHXCOLLISIONPRIMITIVEDESCRIPTOR_H_INCLUDE_GUARD

#include "PhxRigidBodyDescriptor.h"

namespace phx
{ 
	/*!
	 * Shape types.
	 */ 
	typedef enum ShapeTypes
	{
		NO_SHAPE,
		SPHERE_SHAPE,
		PLANE_SHAPE,
		BOX_SHAPE,
		TERRAIN_SHAPE
	} ShapeTypes;

	/*!
	 * Collision primitive descriptor. 
	 *
	 * It groups a shape descriptor and a rigid body descriptor.
	 */
	struct CollisionPrimitiveDescriptor : public RigidBodyDescriptor
	{
		/*!
		 * Destructor (virtual).
		 */
		virtual ~CollisionPrimitiveDescriptor() { }

		/*!
		 * Return the shape type.
		 */
		virtual ShapeTypes GetShapeType() const = 0;

		/*!
		 * Set data for the rigid body.
		 */
		void SetRigidBodyDescriptor(const RigidBodyDescriptor& desc)
		{
			mMass				= desc.mMass;
			mInertiaTensor		= desc.mInertiaTensor;
			mLinearDamping		= desc.mLinearDamping;
			mAngularDamping		= desc.mAngularDamping;
			mPosition			= desc.mPosition;
			mOrientation		= desc.mOrientation;
			mVelocity			= desc.mVelocity;
			mAngularVelocity	= desc.mAngularVelocity;
			mAcceleration		= desc.mAcceleration;
		}
	};
}

#endif // PHXCOLLISIONPRIMITIVEDESCRIPTOR_H_INCLUDE_GUARD